Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ungap/url-search-params

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ungap/url-search-params

The URLSearchParams polyfill.

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @ungap/url-search-params?

@ungap/url-search-params is a polyfill for the URLSearchParams interface, which allows you to work with the query string of a URL. It provides methods to easily create, manipulate, and parse URL query parameters.

What are @ungap/url-search-params's main functionalities?

Creating URLSearchParams

This feature allows you to create a new URLSearchParams object from a query string. The object can then be used to manipulate the query parameters.

const params = new URLSearchParams('key1=value1&key2=value2');

Appending Parameters

This feature allows you to append new parameters to the existing URLSearchParams object.

params.append('key3', 'value3');

Getting Parameter Values

This feature allows you to retrieve the value of a specific parameter from the URLSearchParams object.

const value = params.get('key1');

Deleting Parameters

This feature allows you to delete a specific parameter from the URLSearchParams object.

params.delete('key2');

Iterating Over Parameters

This feature allows you to iterate over all the parameters in the URLSearchParams object.

for (const [key, value] of params) { console.log(key, value); }

Other packages similar to @ungap/url-search-params

Keywords

FAQs

Package last updated on 21 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc